
from django.conf.urls import url
from . import views
from rest_framework_jwt.views import obtain_jwt_token

urlpatterns = [
    # 注册用户
    url(r'^users/$', views.UserView.as_view()),
    # 注册用户名是否已经注册
    url(r'^usernames/(?P<username>\w{5,20})/count/$', views.UserCountView.as_view()),
    # 注册手机号码是否已经注册
    url(r'^phones/(?P<phone>1[3-9]\d{9})/count/$', views.PhoneCountView.as_view()),

    # 用户中心
    # # 详情
    url(r'^user/$', views.UserDetailView.as_view()),
    # # 邮箱验证
    url(r'^email/$', views.EmailView.as_view()),

    # JWT 已经完成了登入后端代码的封装，认证逻辑还是django框架
    url(r'^authorizations/$', obtain_jwt_token),
]